import ConditionForm from './ConditionForm';
import MethodForm from './MethodForm';
import CodeForm from './CodeForm';
import MySqlForm from './MySqlForm';
import { ElementType } from '../../config';
import AssignForm from './AssignForm';

const nodeFormMap = {
  [ElementType.CONDITION]: ConditionForm,
  [ElementType.METHOD]: MethodForm,
  [ElementType.CODE]: CodeForm,
  [ElementType.ASSIGN]: AssignForm,
  [ElementType.MYSQL]: MySqlForm,
};

export function getNodeForm(type) {
  return nodeFormMap[type];
} 